import request from '@/utils/request'

export function getDepartment() {
  return request({
    url: '/company/department'
  })
}

export function getSimpleList() {
  return request({
    url: '/sys/user/simple'
  })
}

export function addDepartment(data) {
  return request({
    method: 'POST',
    url: '/company/department',
    data
  })
}
// 通过id获取单条得数据
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 更新数据
export function updateDepartment(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
// 删除数据
export function delDepartment(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
